<?php

namespace app\models;

use Yii;
use yii\base\Model;

/**
 * ContactForm is the model behind the contact form.
 */
class SendmessageForm extends Model
{
    public $receiver;
    public $content;

    /**
     * @return array the validation rules.
     */
    public function rules()
    {
        return [
            [['receiver', 'content'], 'required'],
            [['receiver'],'string','min'=>1,'max'=>30],
            [['content'],'string','min'=>1,'max'=>65536],
        ];
    }

    /**
     * @return array customized attribute labels
     */
     public function attributeLabels()
     {
         return [
             'receiver' => '收信人',
             'content' => '消息内容'
         ];
     }

}
